package com.toogu.mazhangmen.ui.monitor;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.WindowManager;

import com.toogu.mazhangmen.R;
import com.toogu.mazhangmen.service.DestoryService;

public class MonitorActivity extends AppCompatActivity {
    private MonitorPresenter presenter;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        DestoryService.add(this);
        getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);//去掉状态栏
        setContentView(R.layout.activity_monitor);

        MonitorContract.IView mainView = new MonitorIView(this);
        MonitorContract.IModel mainModel = new MonitorIModel(this);
        presenter = new MonitorPresenter(this);
        presenter.onCreate(mainView, mainModel);
    }

    @Override
    protected void onStart() {
        super.onStart();
        presenter.onResume();
    }

    @Override
    protected void onStop() {
        super.onStop();
        presenter.onPause();
    }

    @Override
    protected void onDestroy() {
        super.onDestroy();
        presenter.onDestory();
    }

}